<?php
/**
 * Created by PhpStorm.
 * User: gxk
 * Date: 2019/4/15
 * Time: 15:01
 */
namespace Model;
use Illuminate\Database\Eloquent\Model as Model;
defined('slim') or exit('访问不合法');
class User extends Model
{
    protected $table = 'user';
    protected $primaryKey = 'user_id';
    public $timestamps = false;
    public function __construct()
    {
        parent::__construct();
    }
    /*
     * 根据主键条件获取一条
     */
    public function getoneByid($id)
    {
        return User::find($id);
    }
}